#ifndef __PROP_H_
#define __PROP_H_

#include <MyString.h>

enum Effect
{
<<<<<<< HEAD
    Frozen = 1,//冰冻
    SuckBlood,//吸血
    Reflex, //荆棘
    Combo //连击
=======
    Frozen,//冰冻
    SuckBlood,//吸血
    Reflex //荆棘
>>>>>>> c412670cb91f5a48c84219f2f6837419b34335e7
};

enum PropType
{
    Weapon,
    Defence,
    Medicament
};

struct Prop
{
    enum PropType type;//道具类型
    void *ptr;//指向道具的指针
};
typedef struct Prop prop;

prop *CreateProp(enum PropType type,void *ptr);
void FreeProp(void *p,void (*ClearPtr)(void *));

struct Weapon
{
    int id;
    MyStr name;
    int ATK;
<<<<<<< HEAD
    int Maxcount;
    int count;
=======
>>>>>>> c412670cb91f5a48c84219f2f6837419b34335e7
    enum Effect effect;
};
typedef struct Weapon weapon;

<<<<<<< HEAD
weapon *CreateWeapon(int id,const char *name,int ATK,enum Effect effect,int count);
void FreeWeapon(void *ptr);
MyStr WeaponToString(weapon *w);
=======
weapon *CreateWeapon(int id,const char *name,int ATK,enum Effect effect);
void FreeWeapon(void *ptr);
>>>>>>> c412670cb91f5a48c84219f2f6837419b34335e7


struct Defence
{
    int id;
    MyStr name;
<<<<<<< HEAD
    int DEF;
    int Maxcount;
    int count;
=======
    int def;
>>>>>>> c412670cb91f5a48c84219f2f6837419b34335e7
    enum Effect effect;
};
typedef struct Defence defence;

<<<<<<< HEAD
defence *CreateDefence(int id,const char *name,int DEF,enum Effect effect,int count);
=======
defence *CreateDefence(int id,const char *name,int def,enum Effect effect);
>>>>>>> c412670cb91f5a48c84219f2f6837419b34335e7
void FreeDefence(void *ptr);


struct Medicament
{
    MyStr name;
    int HP;
    int id;
    int count;
    enum Effect effect;
};
typedef struct Medicament medicament;

medicament *CreateMedicament(int id,const char *name,int HP,enum Effect effect);
void FreeMedicament(void *ptr);

<<<<<<< HEAD
// void JudgeEffect(player *p,monster *m);


=======


void InitWeapon(weapon *w);
void InitDefence(defence *d);
void InitMedicament(medicament *m);
>>>>>>> c412670cb91f5a48c84219f2f6837419b34335e7

#endif